package com.xiaoxi.exam.controller;

import cn.xinzhili.xutils.core.http.Response;
import com.xiaoxi.exam.bean.request.RegisterExamRequest;
import com.xiaoxi.exam.service.AccountService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/account")
public class AccountController {

  @Autowired
  private AccountService accountService;

  @ApiOperation(value = "绑定报考账号", notes = "绑定报考账号")
  @ApiImplicitParam(name = "request", value = "报考信息", required = true, dataType = "RegisterExamRequest")
  @PostMapping
  public Response registerToefl(@RequestBody RegisterExamRequest request) {
    return accountService.addAccount(request);

  }

}
